from django.shortcuts import render,redirect
from django.http import HttpResponse
from django.urls import reverse
def myapp(request):
    return render(request,'index.html')
def hello(request):
    return HttpResponse("Hello, Django!")
def add_numbers(request, num1, num2):
    result = num1 + num2
    return HttpResponse(f"Sum is: {result}")
def post_number(request, number):
    return HttpResponse(f"Post number: {number}")
def dynamic_url(request):
    hello_url = reverse('myapp:hello_Django')
    return HttpResponse(f"Dynamic URL for 'hello' is: {hello_url}")
def redirect_to_add(request):
    return redirect('myapp:add', num1=4, num2=6)

